package A02;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
//百分之七十的概率抽到女生
public class Test2 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Collections.addAll(list,1,1,1,1,1,1,1);
        Collections.addAll(list,2,3,3);
        Collections.shuffle(list);
        Random r = new Random();
        int index = r.nextInt();
        int number = list.get(index);
        System.out.println(number);
        ArrayList<String > boylist = new ArrayList<>();
        ArrayList<String > girllist = new ArrayList<>();

        if (number == 1){
            int boyIndex = r.nextInt(boylist.size());
            String name = boylist.get(boyIndex);
            System.out.println(name);
        }
        else{
            int girlIndex = r.nextInt(boylist.size());
            String name = girllist.get(girlIndex);
            System.out.println(name);
        }
    }
}
